package member.order.model;

import m.common.model.FieldMeta;
import m.common.model.LinkTableMeta;
import m.common.model.Model;
import m.common.model.TableMeta;
import m.common.model.type.FieldType;
import member.base.model.BusinessInfo;
import member.base.model.UserInfo;

import java.util.Date;

@TableMeta(name="o_month_wages",description="月度工资表")
public class MonthWages extends Model {
    @LinkTableMeta(name="business_oid",table= BusinessInfo.class,description="所属商家")
    private BusinessInfo business;
    @LinkTableMeta(name="user_oid",table= UserInfo.class,description="员工")
    private UserInfo user;
    @FieldMeta(name="n_year_month",type= FieldType.STRING,length = 10,description="年月")
    private String yearMonth;
    @FieldMeta(name = "wages",type = FieldType.DOUBLE,description = "月工资")
    private Double wages;
    @FieldMeta(name = "order_ratio",type = FieldType.DOUBLE,description = "订单提成")
    private Double orderRatio;
    @FieldMeta(name = "recharge_ratio",type = FieldType.DOUBLE,description = "充值提成")
    private Double rechargeRatio;

    @FieldMeta(name = "wages_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "提成金额")
    private Double wagesAmount;
    @FieldMeta(name = "reward_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "奖励金额")
    private Double rewardAmount;
    @FieldMeta(name = "pay_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "付款金额")
    private Double payAmount;
    @FieldMeta(name="status",type= FieldType.STRING,description="状态",defaultValue = "N",dictOption = "Y:已发放,N:已生成")
    private String status;
    public final static String Status_Done="Y";
    public final static String Status_Build="N";
    @LinkTableMeta(name="confirm_user_oid",table= UserInfo.class,description="确认人")
    private UserInfo confirmUser;
    @FieldMeta(name="confirm_date",type=FieldType.DATE,description="确认时间")
    private Date confirmDate;

    public Double getWagesAmount() {
        return wagesAmount;
    }

    public void setWagesAmount(Double wagesAmount) {
        this.wagesAmount = wagesAmount;
    }

    public Double getRewardAmount() {
        return rewardAmount;
    }

    public void setRewardAmount(Double rewardAmount) {
        this.rewardAmount = rewardAmount;
    }

    public BusinessInfo getBusiness() {
        return business;
    }

    public void setBusiness(BusinessInfo business) {
        this.business = business;
    }

    public Double getWages() {
        return wages;
    }

    public void setWages(Double wages) {
        this.wages = wages;
    }

    public Double getOrderRatio() {
        return orderRatio;
    }

    public void setOrderRatio(Double orderRatio) {
        this.orderRatio = orderRatio;
    }

    public Double getRechargeRatio() {
        return rechargeRatio;
    }

    public void setRechargeRatio(Double rechargeRatio) {
        this.rechargeRatio = rechargeRatio;
    }

    public UserInfo getUser() {
        return user;
    }

    public void setUser(UserInfo user) {
        this.user = user;
    }

    public String getYearMonth() {
        return yearMonth;
    }

    public void setYearMonth(String yearMonth) {
        this.yearMonth = yearMonth;
    }

    public Double getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(Double payAmount) {
        this.payAmount = payAmount;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public UserInfo getConfirmUser() {
        return confirmUser;
    }

    public void setConfirmUser(UserInfo confirmUser) {
        this.confirmUser = confirmUser;
    }

    public Date getConfirmDate() {
        return confirmDate;
    }

    public void setConfirmDate(Date confirmDate) {
        this.confirmDate = confirmDate;
    }
}
